from .mqRPC_client import MqRPCClient
import sys


class CurrentClass(MqRPCClient):
    def __init__(self, async=False):
        super().__init__(async)
        self.server_queue = "mqRPC_queue"
        self.dead_queue = "mqRPC_queue_dead_queue"

    def div(self, *args, **kwargs):
        request = {'class_point': 'CurrentClass', 'func_point': 'div', 
                   'paras': {'args': args, 'kwargs': kwargs}}
        func_name = sys._getframe().f_code.co_name
        return self.send_request(request, func_name)

    def test_alias(self, *args, **kwargs):
        request = {'class_point': 'CurrentClass', 'func_point': 'test_alias', 
                   'paras': {'args': args, 'kwargs': kwargs}}
        func_name = sys._getframe().f_code.co_name
        return self.send_request(request, func_name)

    def add(self, *args, **kwargs):
        request = {'class_point': 'CurrentClass', 'func_point': 'add', 
                   'paras': {'args': args, 'kwargs': kwargs}}
        func_name = sys._getframe().f_code.co_name
        return self.send_request(request, func_name)

    def minus(self, *args, **kwargs):
        request = {'class_point': 'CurrentClass', 'func_point': 'minus', 
                   'paras': {'args': args, 'kwargs': kwargs}}
        func_name = sys._getframe().f_code.co_name
        return self.send_request(request, func_name)

    def multi(self, *args, **kwargs):
        request = {'class_point': 'CurrentClass', 'func_point': 'multi', 
                   'paras': {'args': args, 'kwargs': kwargs}}
        func_name = sys._getframe().f_code.co_name
        return self.send_request(request, func_name)
